package strings;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.junit.Ignore;
import org.junit.Test;

public class ReFlagsMY {
	
	@Test
	@Ignore
	public void test001() {
		Pattern p = Pattern.compile("^java", Pattern.CASE_INSENSITIVE
				| Pattern.MULTILINE);
		Matcher m = p.matcher("java has regex\nJava has regex\n"
				+ "JAVA has pretty good regular expressions\n"
				+ "Regular expressions are in Java");
		while (m.find()) {
			System.out.println(m.group());
		}
	}
	
	@Test
	@Ignore
	public void test002() {
		Pattern p = Pattern.compile("java", Pattern.CASE_INSENSITIVE
				| Pattern.MULTILINE);
		Matcher m = p.matcher("java has regex\nJava has regex\n"
				+ "JAVA has pretty good regular expressions\n"
				+ "Regular expressions are in Java");
		while (m.find()) {
			System.out.println(m.group());
		}
	}
}
